home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Simple_Module2 / IPCWindow / smakefile < prev   
Makefile  |  1998-09-01  |  3KB  |  106 lines

  1.  
  2. # Makefile for a sample Opus 5 module
  3. # This is based on the structure of the real Opus makefile, but may be
  4. # adapted as you see fit
  5.  
  6. # It's now a little bit tricky, here is needed that all files from the
  7. # parent directory have the right date 
  8.  
  9. # Declare some variables, so we must not change multiple lines
  10. # Object files for this module
  11.  
  12. EXAMPLEOBJS   =  modinit.o /ModuleEntry.o /ExampleRequest.o IPCWindow.o /HiddenCommand.o /buildinstrings.o
  13.  
  14. # You should always have the modinit.o on the first place. After this
  15. # there should be your file with the L_ModuleEntry() function. All other
  16. # may follow like you want...
  17.  
  18.  
  19. # Library-Name/-Version/-Revision
  20. # use only lowercase for the name of the module
  21.  
  22. MODULENAME    = example.module
  23. EXAMPLEVER    = 56
  24. EXAMPLEREV    = 0
  25.  
  26.  
  27. # Compiler options
  28. CCOPTS =  noversion optimize
  29.  
  30. # Linker options
  31. SLINKOPTS = noicons smallcode smalldata
  32.  
  33.  
  34. #######################################################################
  35.  
  36. # If you have "ALL" in the tooltypes of your "Build" icon, this objects
  37. # will be created...
  38.  
  39. ALL: /includes/buildin.strings $(MODULENAME)
  40.  
  41. #######################################################################
  42.  
  43. # Note to the line starting with "lib" :
  44. # The last entry is an object library created by Dirk Stoecker. This
  45. # does supply some replacements for the string.h and some other stuff
  46. # (in conclusion with sdi_std.h)
  47. # This results in smaller code. It is your choice ...
  48. # If you don't want use it, delete "lib:sdi_std.lib", but you must
  49. # include instead the "string.h" (if you need their functions).
  50.  
  51. # Do not modify other stuff here !!!
  52.  
  53. $(MODULENAME): $(EXAMPLEOBJS) smakefile scoptions
  54.                slink with <<
  55. libprefix _L_
  56. libfd /modules.fd
  57. from lib:libent.o lib:libinit.o $(EXAMPLEOBJS)
  58. to $@
  59. lib lib:sc.lib lib:amiga.lib lib:dopuslib.lib //sc/lib/sdi_std.lib
  60. libversion $(EXAMPLEVER)
  61. librevision $(EXAMPLEREV)
  62. $(SLINKOPTS)
  63. <
  64.  
  65. #######################################################################
  66.  
  67. modinit.o: modinit.c
  68.  
  69. #
  70.  
  71. IPCWindow.o: IPCWindow.c /includes/Window.h /includes/Project.h /includes/buildin.strings
  72.  
  73. #######################################################################
  74.  
  75. # Build what from what and how...
  76.  
  77. .c.o:
  78.              sc $(CCOPTS) $*.c
  79. .asm.o:
  80.              sc:c/asm -iASMINC: $*.asm
  81. .cd.strings:
  82.              catcomp descriptor=$*.cd cfile=$*.strings
  83.  
  84. #######################################################################
  85.  
  86. # Done only if the tooltype CLEAN is supplied ...
  87.  
  88. clean:
  89.          delete ~(\#?_strings).o quiet
  90.          copy *.module DOpus5:modules
  91.          setdate \#?.cd
  92.  
  93. #######################################################################
  94.  
  95. # My choice :-) (, but first "ALL" )
  96.  
  97. copy:
  98.         copy *.module DOpus5:modules
  99.         wait 5
  100.         avail flush
  101.  
  102. #######################################################################
  103.  
  104.  
  105.  
  106.